--=============--
---- Classes ----
--=============--
assets = Core.class(Sprite)

function assets:init(texture)
  local bitmap = Bitmap.new(Texture.new(texture))
  bitmap:setAnchorPoint(0.5, 0.5)
  self:addChild(bitmap)
end

--=====================--
---- debug functions ----
--=====================--
local function touch2str(touch)
	return string.format("#%d=%g,%g", touch.id, touch.x, touch.y)
end

local function touches2str(touches)
	local str = ""
	for i=1,#touches do
		str = str..touch2str(touches[i])
		if i < #touches then
			str = str.."; "
		end
	end
	return str
end

--================--
---- debug info ----
--================--
function printTouches(type, event)
	print(type.." ["..touch2str(event.touch).."] - ["..touches2str(event.allTouches).."]")
end
